<template>
  <div class="left">
    <el-menu
      default-active="2"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      router
      >
      <el-menu-item
      v-for="(item,index) in $store.getters['leftmenu']" :key='index'
      :index="'/home'+item.url"
       >
        <ul>
          <li>
            <i class="iconfont" :class="item.ico"></i>
            {{item.name}}
          </li>
        </ul>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: 'LeftV',
  data () {
    return {
      msg: null,
      LeftList: []
    }
  },
  methods: {
    handleOpen (key, keyPath) {
      console.log(key, keyPath)
    },
    handleClose (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>

<style lang="less" scoped>
.left{
  ul{
    li{
      color: #272e40;
      background: #f4f4f4;
    }
  }
}

.el-menu{
  overflow: hidden;
}

</style>
